import Vue from 'vue'

Vue.filter('phoneFilter', (phone) => {
  if(!phone) return '';
  var reg = /^(\d{3})\d{4}(\d{4})$/;
  return phone.replace(reg, "$1****$2");
})

Vue.filter('bankFilter', (bank) => {
  return bank.replace(/\D/g, '').replace(/(....)(?=.)/g, '$1 ');
})